<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script src="../xpresso/html/js/ajax/ajax.js">
</script>
<script language="javascript">
	function getData(){
		var req = newXMLHttpRequest();
		
		  // Set the handler function to receive callback notifications
		  // from the request object
		  var handlerFunction = getReadyStateHandler(req, updateContent);
		  req.onreadystatechange = handlerFunction;
		
		  // Open an HTTP POST connection to the shopping cart servlet.
		  // Third parameter specifies request is asynchronous.
		  req.open("POST", "../jsp/Forms.report", true);
		
		  // Specify that the body of the request contains form data
		  req.setRequestHeader("Content-Type", 
							   "application/x-www-form-urlencoded");
		
		  // Send form encoded data stating that I want to add the 
		  // specified item to the cart.
		  req.send("");
	}

	function updateContent(xmlResponse){
		var idForm = xmlResponse.getElementsByTagName("idForm")[1].firstChild.nodeValue;
		alert(idForm);
	}

</script>

</head>

<body>

<input type="button" id="Get Data !" onclick="getData()" value="Get Data !"/>
</body>
</html>
